<!DOCTYPE HTML>
<!-- use thinkphp:layout to output pages -->
<!-- <no_layout name="Layout\layout" />  -->
<div id="main-collect-page">
<style type="text/css">
.label{
	margin:0 1% 0 1%;
}

</style>
<!-- display right answer & explain-->
<div class="tables card pressthis">
	<div class="bs-example widget-shadow " data-example-id="contextual-table"> 
		<h4>错误的题:(点击题号以查看)</h4>
		<table class="table widefat wp-list-table"> 
			<thead> 
				<tr> 
					<th>#</th> 
					<th>题号</th> 
					<th>错误次数</th> 
					<th>正确次数</th> 
				</tr> 
			</thead> 
			<tbody>
					<volist name="labinfos" id="vo">
					 
						<if condition="$i%2 eq 0 "><tr class="info" name="info_row" id="{$vo.itemid}">
							<else /> <tr name="info_row" id="{$vo.itemid}"> 
						</if>
						<th scope="row" >{$i}</th> 
						<td>{$vo.itemid}</td> 
						<td>{$vo.rightcount}</td> 
						<td>{$vo.wrongcount}</td> 
					</tr> 
					</volist>				
			</tbody> 
		</table> 
	</div>
	
</div>	
	<div id="myLoading"></div>
	
	
<!-- display right answer & explain end-->

<!-- Classie -->
		<script src="__PUBLIC__/js/classie.js"></script>
		<script>		
			function getUrlParam (name) {
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
				var r = window.location.search.substr(1).match(reg);
				if (r != null) return unescape(r[2]); return null;
			}
			if(id = getUrlParam('itemid')){			
				$("html,body").animate({scrollTop:$("#"+id).offset().top-200},500);
			}
			$("[name=info_row]").click(function(event){				
				//$("#myLoading").show();				
				var ajaxData ={};
				ajaxData['itemid'] = $(this).attr("id");
				ajaxData["action"] = '{$Think.ACTION_NAME}';
				ajaxData['__hash__'] = $('[name=__hash__]').attr('content');		
				//ajaxData['__hash__'] = document.getElementsByName("__hash__")[0].content;		
				$.post("{:U('Collect/reView')}",
					ajaxData,
					function(data,status){
					// alert("Data: " + data + "\nStatus: " + status);
						$("#main-collect-page").html(data);
				});
				//$("html").text(jsApiParameters);
				//window.location.reload();		
			});
			
		</script>
</div>